package mtm.bp.impl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import mtm.bp.MultTableGenerator;
import mtm.dto.MultSample;

import org.apache.log4j.Logger;

public class MultTableGeneratorImpl implements MultTableGenerator {

    private Logger log = Logger.getLogger(getClass());

    public void sayHello() {
        System.out.println("Generator initialized");
    }

    public List<MultSample> generateTestSamples() {
        List<MultSample> res = new ArrayList<MultSample>();
        for (int a = 2; a < 10; a++) {
            for (int b = 2; b < 10; b++) {
                MultSample ms = new MultSample(a, b);
                res.add(ms);
            }
        }
        Collections.shuffle(res);
        // TODO remove, this is for debugging
        res = res.subList(0, 5);
        return res;
    }
}
